<{include file="public/header.html"}> 
<script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.1.0.js"></script>
<script type="text/javascript">var share_type="wenda";</script>
	<!--问答问题 首页-->
	<header class="title-fixed w100">
		<div class="title title-border-sm bj-white">
                    <a href="<{eval url('wenda')}>" class="title-left col-red title-text">问答</a>
                    <{if $item['is_self']}>
                    <a href="<{$item['edit_url']}>" class="title-top title-right iconfont col-red publicText">&#xe61f;</a>
                    <{else}>
                    <a href="javascript:;" class="title-top title-right iconfont col-red publicReport _report_btn" data-rel="<{$item['detail_url']}>">&#xe624;</a>
                    <{/if}>
                    <input type="hidden" id="answer-info" data-aid="<{$item['answer_id']}>" data-uid="<{$item['answer_uid']}>" data-title="《<{$item['title']}>》--溜溜问答专栏" data-desc="<{$item['content_']}>" data-link="<{$item['detail_url']}>" data-thumb="<{eval url('')}>static/default/img/share-thumb.png"/>
                    <h1 class="text-center name">溜溜问答</h1>
		</div>
	</header>
	<!--问答问题 内容-->
	<div class="wd-answer-details  article-container mt50 mb60">
		<div class="article-head border plr15 ptb10 f-cb">
                    <a href="<{$item['space_url']}>" class="fl head-img mr5"><img src="<{$item['head_img']}>"/></a>
                    <button class="follow fr <{if $item['is_care']}>follow2<{/if}> fct_follow" data-val="<{$item['is_care']}>">
                        <font class="iconfont col-white icon-follow">&#xe640;</font>
                        <i><{if $item['is_care']}>已关注<{else}>关注<{/if}></i>
                    </button>
                    <div class="pt5">
                            <a href="<{$item['space_url']}>" class="name"><{$item['nickname']}><img src="<{$style_dir}>/img/vip/vip1.png"/></a>
                            <p class="time"><{$item['create_time']}></p>
                    </div>
		</div>
		<div class="text border-bottom-lg plr15">
                    <p><{$item['content']}></p>
		</div>
		<div class="answer ptb10 plr15 sliding-jq">
                    <p class="con-title mb10">大家说</p>
                    <ul id="content-list">
                    </ul>
                    <div class="loading" id="noresults" style="display: none;">
                        <a href="javascript:;" class="load-success empty-load">
                            <img src="<{$style_dir}>/img/none/none2.jpg">
                        </a>
                    </div>
                    <div class="loading" id="loading">
                        <a class="/*pull-load*/ load-success" href="javascript:;">加载中...</a>
                    </div>
                    <div class="loading" id="nomoreresults" style="display: none;">
                        <a href="javascript:;" class="load-success nomore-load">已经到底啦~~~</a>
                    </div>
		</div>
	</div>
	<!--问答问题 底部悬浮-->
	<div class="bottom w100" id="bottom-content-box">
		<div class="bottom-article-details bj-white">
                    <a href="javascript:;" class="icon-return iconfont title-top title-left" onclick="javascript:history.go(-1);">&#xe604;</a>
			<a href="javascript:;" class="input-search fl publicText reply-content-a">我要举手发言...</a>
			<ul>
				<!--评论-->
				<li><a href="javascript:;" class="icon-comments icon-size26 iconfont">&#xe618;<b><{$item['commentnum']}></b></a></li>
				<!--点赞-->
				<li><a href="javascript:;" class="icon-praise icon-size26 iconfont relative <{if $item['is_like']}>icon-praise2<{/if}> fct_like" data-val="<{$item['is_like']}>"">&#xe616;</a></li>
				<!--分享-->
				<li><a href="javascript:;" class="publicShare icon-share icon-size26 iconfont _share_answer">&#xe614;</a></li>
			</ul>
		</div>
	</div>
	<!--输入框 弹窗-->
	<div class="public-field-bj publick-jq1 reply-content-box">
		<div class="public-field-text w100 bj-white reply-text-box">
			<div class="btn-list title plr10 ptb10 border f-cb">
				<a href="javascript:;" class="title-top title-left iconfont col-red close-jq _cancel" onclick="">&#xe668;</a>
				<a href="javascript:;" class="title-top title-right iconfont col-red comment-btn _send" data-reply-id="" data-disable-val="发送中" onclick="">&#xe66f;</a>
				<img class="send-load disnone" src="/static/weixin/img/send-load.gif"/>
			</div>
			<div class="text-list plr10 ptb5 border">
				<textarea id="reply-content" class="w100"></textarea>
			</div>
		</div>
	</div>
        <!--分享 弹窗-->
	<div class="public-field-bj publick-jq2 share-answer-box">
            <div class="public-field-share w100 bj-grey share-content-box">
                <div class="plr10 ptb30">
                    <ul class="f-cb" id="share-box">
                        <li data-type="sina"><a href="javascript:;" class="iconfont icon-weibo" >&#xe611;</a><p>微博</p></li>
                        <li data-type="qq-space"><a href="javascript:;" class="iconfont icon-space">&#xe7dc;</a><p>QQ空间</p></li>
                    </ul>
                </div>
                <a href="javascript:;" class="btn close-jq bj-white _close">取&nbsp;消</a>
            </div>
	</div>
        <!--分享提示弹窗-->
        <div class="public-field-bj publick-jq5" id="wx-share" style="display: none;">
                <img src="<{$style_dir}>/img/share.png">
        </div>
        <script type="text/javascript" src="/static/js/native-sha-1.0.js"></script>
        <script type="text/javascript" src="/static/js/scrollpagination.js"></script>
        <script type="text/javascript" src="/static/js/wenda-min-1.0.js"></script>
        <script type="text/javascript">
            $(function(){
                $('body').delegate('.article-container .comments .all','click',function(e){
                    if( $(this).hasClass('active') ){
                        $(this).removeClass('active');
                        $(this).text('展开↓');
                        act1 = $(this).parent().children('.text').animate({'max-height':'70px'},500);
                    }else{
                        $(this).addClass('active');
                        $(this).text('收起↑');
                        act2 = $(this).parent().children('.text').animate({'max-height':'100%'},500);
                    }
                    e.stopPropagation();
                });
            });
        </script>
        <script type="text/javascript">
            var appid = "<{$wxjsapi_config['appid']}>";
            var timestamp = "<{$wxjsapi_config['timestamp']}>";
            var nonceStr = "<{$wxjsapi_config['nonceStr']}>";
            var signature = "<{$wxjsapi_config['signature']}>";
            wx.config({
                debug: false,appId: appid,timestamp: timestamp,nonceStr: nonceStr, signature: signature,
                jsApiList:['checkJsApi','onMenuShareTimeline','onMenuShareWeibo','onMenuShareAppMessage','onMenuShareQQ','onMenuShareQZone' ] 
            });
            var _a = $("#answer-info"),_t=_a.attr("data-title"),_d=_a.attr("data-desc"),_l=_a.attr("data-link"),_i=_a.attr("data-thumb");
            wx.ready(function(){
                wx.onMenuShareAppMessage({title:_t,desc:_d,link:_l,imgUrl:_i,type: '',dataUrl: '',success: function () {},cancel: function () {}});
                wx.onMenuShareTimeline({title:_t,desc:_d,link:_l,imgUrl:_i,success: function () {},cancel: function () {}});
                wx.onMenuShareQQ({title:_t,desc:_d,link:_l,imgUrl:_i,type: '',dataUrl: '',success: function () {},cancel: function () {}});
                wx.onMenuShareWeibo({title:_t,desc:_d,link:_l,imgUrl:_i,success: function () {},cancel: function () {}});
                wx.onMenuShareQZone({title:_t,desc:_d,link:_l, imgUrl:_i,success: function () {},cancel: function () {}});
            });
            
            var currentPage = 0;
            $('#content-list').scrollPagination({
                'contentPage': "/ajax/ajax_fetch_reply",
                'contentData': {
                    'answerId': $("#answer-info").attr("data-aid"),
                    'pageIndex': currentPage
                },
                'scrollTarget': $(window),
                'heightOffset': 0,
                'beforeLoad': function() { // before load function, you can display a preloader div
                    $('#loading').fadeIn('fast');
                    $('#loading').attr('scrollpagination','disabled');
                },
                'afterLoad': function(elementsLoaded) { // after loading content, you can use this function to animate your new elements
                    $('#loading').fadeOut('fast');
                    $('#loading').attr('scrollpagination','enabled');
                    if (elementsLoaded.length == 0) {
                        if(currentPage != 0){
                            $('#nomoreresults').fadeIn('slow');
                        }
                        $('#content-list').stopScrollPagination();
                    }else{
                        currentPage = currentPage + 1;
                    }
                    if(elementsLoaded.length != 0 && currentPage == 1){
                        $('#nomoreresults').fadeIn('slow');
                    }
                    if(elementsLoaded.length == 0 && currentPage == 0){
                        $("#noresults").fadeIn('slow');
                    }else{
                        this.contentData.pageIndex = currentPage;
                        $(elementsLoaded).fadeInWithDelay();
                    }
                    if ($('#content-list').children().length > 100) { // if more than 100 results already loaded, then stop pagination (only for testing)
                        $('#nomoreresults').fadeIn();
                        $('#content-list').stopScrollPagination();
                    };
                }
            });     
            $.fn.fadeInWithDelay = function() {
                var delay = 0;
                return this.each(function() {
                    $(this).delay(delay).animate({
                        opacity: 1
                    }, 200);
                    delay += 100;
                });
            };
        </script>
<{include file="public/footer.html"}> 
